package model;

import javax.persistence.Id;

/**
 * An example model
 * @author noelb
 *
 */
public class User {

	private static final long serialVersionUID = 1L;
	
	@Id
	public Long id;
	
	public String name;
	public String gender;
	
	//Objectify requires that you implement a constructor without params
	public User() {}
	
	
	//GETTERS - these are required for us to use this POJO as a model in JSTL/EL in a JSP page. 
	//If you use a custom templating language, you may not need these
	public Long getId() { return id; }
	public String getName() { return name; }
	public String getGender() { return gender; }
	
	//Custom functions
	public double getSalary() {
		double baseSalary = 50000.0;
		if (gender == "female") return baseSalary*.777; //Implement gender gap
		else return baseSalary;
	}
	
	
}